
using JTZY.Model.Order;

namespace JTZY.Model.Business
{
    /// <summary>
    /// 用户余额表
    /// </summary>
    [SugarTable("corecmsuserbalance")]
    public class Corecmsuserbalance
    {
        /// <summary>
        /// 序列 
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 用户id 
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 类型 
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 金额 
        /// </summary>
        public decimal Money { get; set; }

        /// <summary>
        /// 余额 
        /// </summary>
        public decimal Balance { get; set; }

        /// <summary>
        /// 资源id 
        /// </summary>
        public string SourceId { get; set; }

        /// <summary>
        /// 描述 
        /// </summary>
        public string Memo { get; set; }

        /// <summary>
        /// 创建时间 
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 商品ID 
        /// </summary>
        public int? ProductId { get; set; }

        /// <summary>
        /// Addon 
        /// </summary>
        public string Addon { get; set; }

        /// <summary>
        /// ImageUrl 
        /// </summary>
        public string ImageUrl { get; set; }

        /// <summary>
        /// Nums 
        /// </summary>
        public int? Nums { get; set; }

        [Navigate(NavigateType.OneToOne, nameof(Corecmsuser.Id), nameof(UserId))] //自定义关系映射
        public Corecmsuser CorecmsuserNav { get; set; }
        public string OrderId { get; set; }
    }
}